<template>
  <div class="wrapper wrapper-content animated fadeInRight v-cloak" v-cloak>
    <div class="row">
      <div class="ibox float-e-margins">
        <div class="form m-tibox-content col-md-12">
          <div class="clearfix "></div>
          <div class="form-group col-sm-3">
            <label class="col-md-5 control-label">角色id：</label>
            <div class="col-md-12 form-control">
              {{item.id}}
            </div>
          </div>
          <div class="form-group col-sm-3">
            <label class="col-md-5 control-label">角色名称：</label>
            <div class="col-md-12 form-control">
              {{item.name}}
            </div>
          </div>
          <div class="form-group col-sm-3">
            <label class="col-md-5 control-label">超级管理员0否1是：</label>
            <div class="col-md-12 form-control">
              {{item.isSuper}}
            </div>
          </div>

          <div class="form-group col-sm-3">
            <label class="col-md-5 control-label">备注：</label>
            <div class="col-md-12 form-control">
              {{item.memo}}
            </div>
          </div>
          <div class="form-group col-sm-3">
            <label class="col-md-5 control-label">排序：</label>
            <div class="col-md-12 form-control">
              {{item.orderNo}}
            </div>
          </div>
          <div class="form-group col-sm-3">
            <label class="col-md-5 control-label">版本号：</label>
            <div class="col-md-12 form-control">
              {{item.version}}
            </div>
          </div>

          <div class="form-group col-sm-3">
            <label class="col-md-5 control-label">关键字：</label>
            <div class="col-md-12 form-control">
              {{item.keyword}}
            </div>
          </div>
          <div class="form-group col-sm-3">
            <label class="col-md-5 control-label">是否删除：</label>
            <div class="col-md-12 form-control">
              {{item.delFlag}}
            </div>
          </div>
          <div class="form-group col-sm-3">
            <label class="col-md-5 control-label">创建时间：</label>
            <div class="col-md-12 form-control">
              {{item.dateCreated | date('yyyy-MM-dd HH:mm:ss')}}
            </div>
          </div>

          <div class="form-group col-sm-3">
            <label class="col-md-5 control-label">更新时间：</label>
            <div class="col-md-12 form-control">
              {{item.dateUpdated | date('yyyy-MM-dd HH:mm:ss')}}
            </div>
          </div>
          <div class="clearfix "></div>
          <div class="col-12 text-center" style="height: 50px;">
            <div style="width: 200px; margin: 0 auto;text-align: center;">
              <a @click="lbox.closeMyBoxLayer()" class="btn btn-danger" href="javascript:">返回</a>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script type="text/javascript">
  import '@/assets/css/style.css'

  import axios from 'axios'
  import {$storage, apiUtil, site} from '@/assets/js/boss'

  export default {
    data() {
      return {
        item: {}
      }
    },
    mounted() {
      let that = window.$vueApp = this;
      document.getElementsByTagName('body')[0].className = 'fixed-sidebar full-height-layout';
      that.staff.init(() => {
        if (apiUtil.existSessionKey(site.authRole.info)) {
          axios.post(site.authRole.info + $storage.getItem(site.authRole.info), {}).then(function (response) {
            const result = response.data;
            if (result.code === 0) {
              that.item = result.data;
            } else {
              alert(result.message);
            }
          });
        }
      });
    },
    methods: {}
  }
</script>
